package cn.mandy.sysadmin.service;

import cn.mandy.sysadmin.dto.MandyAuthority;
import cn.mandy.sysadmin.dto.MandyDictFrontEnd;
import cn.mandy.sysadmin.dto.MandyMainMenu;
import cn.mandy.sysadmin.model.MandyParameter;
import cn.mandy.sysadmin.model.MandyRole;
import cn.mandy.sysadmin.model.MandyUser;
import cn.mandy.sysadmin.model.MandyUserRole;

import java.util.List;

public interface MandyCacheService {

    MandyUser getMandyUserByName(String username);
    void cacheEvictGetMandyUserByName(String username);

    List<MandyUserRole>  listUserRolesByUserId(Long userId);
    void cacheEvictListUserRolesByUserId(Long userId);
    void cacheEvictListUserRolesEntries();

    MandyRole getRoleById(Long roleId);
    void cacheEvictGetRoleById(Long roleId);

    List<MandyAuthority>  listMandyAuthorityByRoleId(Long roleId);
    void cacheEvictListMandyAuthorityByRoleId(Long roleId);

    List<MandyMainMenu> getRoleMainMenu(Long roleId);
    void cacheEvictGetRoleMainMenu(Long roleId);

    List<MandyParameter> getParameters(Long roleId, String requestUrl);
    void cacheEvictGetParametersEntries();

    List<MandyDictFrontEnd> dictList();
}
